$(function(){
	if(localStorage.getItem("products")) {
	var result = localStorage.getItem("products");
	var data = JSON.parse(result);
	$('.shoppingcar_total').html('<td class="total_img"><img src='+data[0].pImgSrc+' /></td>'
	                             +'<td class="total_text"><span>'+data[0].pName+'</span><br><b>适配机型</b></td>'
	                             +'<td class="total_price">'+data[0].prcie+'</td>'
	                             +'<td class="total_count" style="border:none"><input type="number" id="number" value=1 style="height:15px;width:42px;margin-left:34%;" onchange="change()"></td>'
	                             +'<td class="total_priceone">'+data[0].prcie+'</td>'
	                             +'<td class="total_delet" onclick="del()"><img src="images/shop1.jpg" /></td>')
	}
})
function change(){
	if($('#number').val()<1){
		$('#number').val('1')
	}
	$('.total_priceone').html(59*$('#number').val()+'元')
	$('#allnum').html(59*$('#number').val()+'元')
}
function del(){
	localStorage.removeItem("products");
	$('.shoppingcar_total').html('')
	
}
